package com.mcarthur.countdown.client.event;

import com.google.gwt.event.shared.EventHandler;
import com.google.gwt.event.shared.GwtEvent;

public abstract class Event<H extends EventHandler, T extends GwtEvent.Type<H>> extends GwtEvent<H> {

    /**
     * The associated event type.
     */
    protected T type;

    /**
     * Constructs a GwtEvent instance with the specified event type.
     *
     * @param type the associated event type
     */
    public Event(T type) {
        this.type = type;
    }

    @Override
    public final T getAssociatedType() {
        return type;
    }
}